home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 97 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.0 KB

  1. From: dak <pierreba@poster.cae.ca>
  2. Message-ID: <Pine.A32.3.91.960122095620.24366A-100000@zorglub.cae.ca>
  3. X-Original-Date: Mon, 22 Jan 1996 10:08:37 -0500 (EST)
  4. Path: in1.uu.net!bounce-back
  5. Date: 22 Jan 96 22:13:49 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Organization: -
  8. Newsgroups: comp.std.c++
  9. Subject: Re: auto_ptr again
  10. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  11.     iQBFAgUBMQQMN+EDnX0m9pzZAQH8aQF/WIUvPRPIxnJVol7C4JVhcyFxevcOLxpC
  12.     tyssQnpH8scdfjHK5sGuGj/jGIB/XzpZ
  13.     =iHgm
  14.  
  15. In article <AUSTERN.96Jan18103535@isolde.mti.sgi.com>, Matt Austern
  16. (austern@isolde.mti.sgi.com) wrote:
  17.  
  18. > In article <4djrn4$js1@engnews1.Eng.Sun.COM> clamage@Eng.Sun.COM
  19. > (Steve Clamage) writes:
  20.  
  21. [snip]
  22.  
  23. > > That is, single ownership is a deliberate design decision based on the
  24. > > semantics an auto-ptr should have. It is not an implementation issue.
  25. > I thought it was generally agreed that auto_ptrs as currently defined
  26. > were broken---specifically, that the semantics of strict ownership,
  27. > constness, and the binding of temporary objects, ended up making an
  28. > auto_ptr nearly useless for returning a value from a function.
  29.  
  30. [snip]
  31.  
  32. I would like to know what happened to the suggestion that the choice of
  33. having temporaries be const be changed to a more relaxed rule.  I do not
  34. recall the exact wording of the proposition, but I believed it only put
  35. const on temporaries that were the result of a conversion.
  36.  
  37. Has it even been discussed ? I do find it quite cynical that this exact
  38. choice (temporaries are const) makes it hard to use auto_ptr in return
  39. value (and some other uses too in smart pointer), while most compiler have
  40. a switch to allow non-const temporaries (and thus disabling any protection
  41. from unexpected conversion on function argument that was the original
  42. intent).
  43.  
  44. If it was rejected, I'd like to know on what ground, if anyone recalls.
  45. ---
  46. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  47.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  48.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  49.